import Vue from 'vue'
import App from './App.vue'
import 'element-ui/lib/theme-chalk/index.css';
import ElementUI from 'element-ui';
import VueRouter from "vue-router";
import Routes from "./router";
import VueI18n from "vue-i18n";
import I18n from "./i18n";

Vue.use(VueI18n);
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.config.productionTip = false
let locale = window.navigator.language;
I18n.load(locale).then(messages => {
  console.log(messages);
  let i18n = new VueI18n({
    locale,
    messages
  });
  new Vue({
    render: h => h(App),
    router: new VueRouter({routes: Routes}),
    i18n
  }).$mount('#app')
})

